#include<stdio.h>
int fuction(int x,int y)
{
	int count=0;
	for(int i=0;i<=y;i++)
	{
		if((i%4==0&&i%100!=0)||i%400==0)
		count++;
	}
	return count;
}
int main ()
{ 
int a,b;
scanf("[%d,%d]",&a,&b);
int result = fuction(a,b);
printf("years=%d",result);
	return 0;
}